package com.jyy.prefabricated.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 试卷区域
 */
@Data
public class ExamPaperArea implements Serializable {

    private static final long serialVersionUID = 1L;

    private Integer id;

    /**
     * 试卷id
     */
    private Integer paperId;

    /**
     * 区域名称
     */
    private String name;

    /**
     * 顺序
     */
    private Integer sort = 1;

    /**
     * 区域规则
     */
    private List<ExamPaperAreaRule> rules = new ArrayList<>();

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    //自主选题集合
    private List<Integer> questionList = new ArrayList<>();

    //自主选题集合
    private List<Question> questions = new ArrayList<>();
    /**
     * 抽题顺序（0顺序抽题，1随机出题,2自主选题）
     */
    private Integer extractingStatus = 0;

    /**
     * 每题分数(自主选题)
     */
    private Double grade;


    /**
     * 区域类型（0考试练习；1课程包）
     */
    private Integer areaType;
}